# Xcode Strings (XCStrings)

Languine supports Xcode's XCStrings format, the modern localization format for iOS and macOS applications. This format handles string catalogs with support for variations, pluralization, and developer comments.

---

## Setting Up

First, make sure you've got a languine.json config file in your project root. Here's an example:

```json
{
  "locale": {
    "source": "en",
    "targets": ["sv", "de", "fr"]
  },
  "files": {
    "xcstrings": {
      "include": ["MyApp/Localizable.xcstrings"]
    }
  }
}
```

## Translating

With your config set, run:

```bash
npx languine@latest translate
```

When you run this command, Languine will:

- Load your XCStrings catalog
- Detect any new or modified strings
- Generate translations for your target languages
- Update the string catalog with new translations
- Preserve string variations and pluralization rules
- Maintain developer comments and context
- Handle variable substitutions
- Support adaptive strings
- Keep formatting specifiers
- Validate string catalog structure
